fix(scan): show real block cadence in the block time stat#105
Merged
github-actions[bot] merged 1 commit intoJun 25, 2026
Merged
Conversation
The block time stat read the chain-performance bucket average, which is windowed by the selected range and inflated by past stalls: it showed ~1.8s on the 1h bucket while testnet was producing ~0.5s blocks. Compute it from the latest blocks instead, falling back to the perf value only when there are not enough blocks to measure.
376431d
into
fix/scan-drop-redundant-sticky-stats
4 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Block Time stat on the home page showed a misleading value. It read the chain-performance endpoint's bucket average, which is windowed by the selected range (1m/5m/1h/24h) and gets inflated by past stalls. On testnet it showed ~1.8s on the 1h bucket while the chain was actually producing ~0.5s blocks (verified from block timestamps: 8 blocks over 4s).
The code already had computeBlockTime() to derive the cadence from recent block timestamps, but it was only a fallback. This makes it the primary source, so the stat reflects the real recent cadence (now shows ~556ms on testnet). Falls back to the perf value, then the target, only when there are not enough blocks to measure.
The 'target 1s' subline is unchanged.
Stacked on #104 (both touch HomeContent). Retarget to main after #104 merges.
Testing: typecheck and build pass. Verified live: testnet block time now shows ~556ms instead of 1.8s.